<template>
	<view :data-theme="theme()" :class="theme() || ''">
		<view class="content address-defalut-wrap">
			<view class="title tc p32">标题</view>
			<view class="d-s-c p-0-32">
				<view class="d-c-c">
					<image class="avatar" src="http://ruiyu.oss-cn-hangzhou.aliyuncs.com/image/newSaas/hua.png" mode="aspectFit"></image>
					<view class="ml20">发表人</view>
				</view>
				<view class="flex-1 tr">{{onTimeDate()}}</view>
			</view>
			<view class="mt50 ml30">内容</view>
			<view class="mt50 ml30 pofiUrl">产品链接:</view>
		</view>
		<view class="publish ">
			<view class="d-s-c p-20-0">
				<view class="ww50 m-0-10">
					<button class="theme-bg white f30" @click="onWaysave">保存草稿</button>
				</view>
				<view class="ww50 m-0-10">
					<button class="theme-bg white f30" @click="onWayAdd">立即发布</button>
				</view>
			</view>
		</view>

	</view>

</template>

<script>
	export default {

		data() {
			return {

			}
		},
		onLoad(option) {

		},
		onShow() {

		},
		methods: {
			// 获取当前时间			
			onTimeDate() {
				let currentDate = new Date();
				let year = currentDate.getFullYear();
				let month = currentDate.getMonth() + 1;
				let day = currentDate.getDate();
				return year + '-' + month + '-' + day
			},
			//保存草稿
			onWaysave() {
				uni.showToast({
					title: '保存成功',
					icon: 'none'
				})
				uni.navigateBack({})
			},
			//发布
			onWayAdd() {
				uni.showToast({
					title: '发布成功',
					icon: 'none'
				})
				uni.navigateBack({})
			},
		}

	}
</script>

<style lang="scss" scoped>
	.content {
		height: 60vh;
		position: relative;

		.pofiUrl {
			position: absolute;
			bottom: 120rpx;
		}
	}
</style>